<div>
  <div style="display:inline-block;position: relative;top: 5px;" *ngIf="showSpinner">
      <mat-spinner mode="indeterminate" diameter="20"></mat-spinner>
  </div>
  <div style="display: inline" *ngIf="showOpen">
    <button mat-button (click)="open.click();">
      <mat-icon>file_upload</mat-icon>
      <ng-container i18n>Open</ng-container>
    </button>
    <button mat-button (click)="save.emit()">
      <mat-icon>add_circle</mat-icon>
      <ng-container i18n>Import</ng-container>
    </button>
    <button mat-button (click)="goBack();">
      <mat-icon>cancel</mat-icon>
      <ng-container i18n="services.form.button.cancel">
        {{ messages.services_form_button_cancel }}
      </ng-container>
    </button>
  </div>
  <div style="display:inline;" *ngIf="showEdit">
    <button mat-button (click)="save.emit();" [disabled]="saveEnabled">
      <mat-icon>save</mat-icon>
        <ng-container i18n="services.form.button.save">
            {{ messages.services_form_button_save }}
        </ng-container>
    </button>
    <button mat-button (click)="goBack();">
      <mat-icon>cancel</mat-icon>
        <ng-container i18n="services.form.button.cancel">
            {{ messages.services_form_button_cancel }}
        </ng-container>
    </button>
  </div>
  <div style="display:inline;" *ngIf="showVersionControl">
    <button mat-button id="commit" *ngIf="isAdmin() && hasChanges()"
            (click)="openModalCommit()">
      <mat-icon>input</mat-icon>
      <ng-container i18n>Commit</ng-container>
    </button>
    <button mat-button *ngIf="isAdmin() && unpublished()" id="publish"
            (click)="openModalPublish()">
      <mat-icon>launch</mat-icon>
      <ng-container i18n>Publish</ng-container>
    </button>
    <button mat-button *ngIf="!isAdmin() && hasChanges()"
            (click)="callSubmit()">
      <mat-icon>file_upload</mat-icon>
      <ng-container i18n>Submit</ng-container>
    </button>
  </div>
  <div style="display:inline;" *ngIf="showRefresh">
    <button mat-icon-button (click)="refresh.emit()">
      <mat-icon>refresh</mat-icon>
    </button>
  </div>

  <div style="display:inline;" *ngIf="!showEdit && showBack">
    <button mat-icon-button (click)="goBack()">
      <mat-icon>arrow_back</mat-icon>
    </button>
  </div>
</div>
<input #open type="file" (change)="openFile.emit($event);" style="display:none;">

